home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -readerstuff- / pete_sullivan / palomafe / installpfe < prev    next >
Text File  |  1999-04-21  |  7KB  |  290 lines

  1. ;**************************************************
  2. ;
  3. ;$VER: PalomaFE V2.0 (Sept.1998)
  4. ;
  5. ; Title:
  6. ;    PalomaFE Installer
  7. ; Description:
  8. ;    The Commodore Installer Script for PalomaFE
  9. ;
  10. ; Installer script by Pete Sullivan
  11. ;
  12. ;**************************************************
  13.  
  14. (set true 1)
  15. (set false 0)
  16. (set quote "\"")
  17. (set nothing "")
  18. (set WB2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
  19.  
  20. (set PalomaFE_dir (getassign "PalomaFE"))
  21. (set c_dir (getassign "C"))
  22. (set libs_dir (getassign "LIBS"))
  23. (set fonts_dir (getassign "FONTS"))
  24. (set devs_dir (getassign "DEVS"))
  25. (set s_dir (getassign "S"))
  26. (set wbstartup_dir (getassign "SYS:WBSTARTUP"))
  27.  
  28. (set Src_root "")
  29. (set Src_c "c/")
  30. (set Src_s "s/")
  31. (set Src_libs "libs/")
  32. (set Src_devs "devs/")
  33. (set Src_rexx "rexx/")
  34. (set Src_DATA "DATA/")
  35. (set Src_Sullitech "/")
  36. (set Src_docs "Docs/")
  37. (set Src_fonts "Fonts/")
  38. (set Src_WBStartup "WBStartup/")
  39. (set Src_AmiFTP "AmiFTP/")
  40. (set Temp_dir "ram:t/")
  41.  
  42. (set MSG_CopyDevs1 "\n\nCopying needed device ")
  43. (set MSG_CopyDevs2 " to DEVS:")
  44.  
  45. ; start with not updated software!
  46.  
  47. (set is_update false)
  48.  
  49. (if  (<> PalomaFE_dir nothing)
  50.      (if  (askbool
  51.                (prompt "\n\n\nAn earlier version of PalomaFE already exists in"
  52.                " your drawer named: \n\n"
  53.                quote PalomaFE_dir quote
  54.                "\n\nDo you want the update installed over it?")
  55.                (help
  56.                "\n\n\nThe installer has determined that you already have a "
  57.                "some version of the PalomaFE software installed "
  58.                "on your system.  If this is wrong or you want the update "
  59.                "installed elsewhere, select 'NO', otherwise select 'YES'."
  60.                )
  61.                (default 1)
  62.           )
  63.                (set is_update true) 
  64.  
  65. ;else ask where to put software
  66.  
  67.                (
  68.                (set PalomaFE_dir
  69.                (askdir
  70.                     (prompt "Where would you like the updated software "
  71.                     "installed?\n"
  72.                     "The directory 'PalomaFE' will be created automatically.\n")
  73.                     (help @askdir-help)
  74.                     (default @default-dest)
  75.                )
  76.                )
  77.  
  78.                (set PalomaFE_dir
  79.                (tackon PalomaFE_dir "PalomaFE")
  80.                )
  81.  
  82.                (makedir PalomaFE_dir
  83.                (infos)
  84.                )
  85.           )
  86.      )
  87. )
  88.  
  89. ; PalomaFE: was not previously assigned, so ask where to make it
  90. (if  (= PalomaFE_dir nothing)
  91.           (
  92.           (set PalomaFE_dir
  93.                (askdir
  94.                     (prompt "Where would you like the software installed?\n"
  95.                     "The directory 'PalomaFE' will be created automatically.\n")
  96.                     (help @askdir-help)
  97.                     (default @default-dest)
  98.                )
  99.           )
  100.  
  101.           (set PalomaFE_dir
  102.           (tackon PalomaFE_dir "PalomaFE")
  103.           )
  104.  
  105.  
  106.           (makedir PalomaFE_dir
  107.           (infos)
  108.           )
  109.      )
  110. )
  111.  
  112. (set @default-dest PalomaFE_dir)
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.    
  129. (complete 10)
  130.  
  131. (working omp "...Please Wait...")
  132.  
  133. (copyfiles
  134.      (prompt "Select file(s) to be copied into your WBStartup: directory:")
  135.      (help "\n\n\n\n\nThis will copy the Paloma TV Control Center facility to your WBStartup: "
  136.      "directory.\n\n\n\n\n\n\n\n"
  137.      @copyfiles-help)
  138.      (source Src_root)
  139.      (dest "SYS:WBStartup")
  140.      (pattern "(FED|FED.info)")
  141.      
  142. )
  143.    
  144. (complete 20)
  145.  
  146. (working omp "...Please Wait...")
  147.  
  148. ;copy Cando.library
  149.  
  150. (copylib
  151.    (source (tackon Src_libs "cando.library"))
  152.    (dest "LIBS:")
  153.    (prompt "Copying needed 'Cando.library' to LIBS:")
  154.    (help @copylib-help)
  155.    
  156. )
  157.  
  158. (complete 30)
  159.  
  160.  
  161.  
  162. ; Copy SulliTech
  163.  
  164. (working omp "...Please Wait...")
  165.    
  166. (set PalomaFE_dir
  167.      (copyfiles
  168.           (prompt "These files will be copied to the PalomaFE: directory:")
  169.           (help "\n\n\n\n\n\nThis will copy Paloma's main "
  170.           "programs.\n\n\n\n\n\n\n"
  171.           @copyfiles-help)
  172.           (source Src_root)
  173.           (dest PalomaFE_dir)
  174.           (pattern "(#?FED|FED.info|OPT|OPT2|Sullot|ReadMe|PalomaTV|PalomaTV.info|PalomaTV.config|QuickStart|QuickStart.info#?)")
  175.           
  176. )
  177.  
  178.  
  179. )
  180.  
  181.  
  182. (complete 40)
  183.  
  184. ;create Documentation directory
  185.  
  186. (set Docs_dir
  187. (cat PalomaFE_dir)
  188. )
  189. (set Docs_dir
  190. (tackon Docs_dir "Docs")
  191. )
  192.  
  193. (makedir Docs_dir
  194. (infos)
  195. )
  196.  
  197. (working omp "...Please Wait...")
  198.  
  199. (copyfiles
  200.      (prompt "Select file(s) to be copied to the PalomaFE:Docs directory:")
  201.      (help "\n\n\n\n\nThis will copy the documentation for "
  202.      "PalomaFE.  This documentation should reside in your "
  203.      "'PalomaFE:Docs' directory.\n\n\n\n\n\n"
  204.      @copyfiles-help)
  205.      (source Src_Docs)
  206.      (dest Docs_dir)
  207.      (pattern "#?.docs#?")
  208.      
  209.  
  210. )
  211.  
  212. (complete 50)
  213.  
  214. ;create Rexx directory
  215.  
  216. (set Rexx_dir
  217. (cat PalomaFE_dir)
  218. )
  219. (set Rexx_dir
  220. (tackon Rexx_dir "Rexx")
  221. )
  222.  
  223. (makedir Rexx_dir
  224. (infos)
  225. )
  226.  
  227. (working omp "...Please Wait...")
  228.  
  229. (copyfiles
  230.      (prompt "These file(s) must be copied into the Rexx directory:")
  231.      (help "\n\n\n\nRexxMast MUST be running on your system for "
  232.      "PalomaFE to use.  These AREXX scripts should reside in your "
  233.      "'PalomaFE:Rexx' directory.\n\n\n\n\n\n"
  234.      @copyfiles-help)
  235.      (source Src_Rexx)
  236.      (dest Rexx_dir)
  237.      (pattern "#?.rexx#?")
  238.      
  239. )
  240.  
  241. (complete 60)
  242.  
  243. ; add assigns to User-Startup if this is not an update
  244.  
  245. (if  (= is_update false)
  246.      (if  (askbool
  247.                (prompt "\nIn order for PalomaFE to work correctly, "
  248.                "Somewhere in the USER-STARTUP must be an assigment"
  249.                " for 'PalomaFE:'\n\n"
  250.                "These lines can be added for you automatically by this "
  251.                "installer.  Would you like these lines added?\n\n")
  252.                (help @askbool-help)
  253.                )
  254.  
  255.                (
  256.                     (if (= @pretend 0)
  257.                     (
  258.                         (
  259.                         (if  (not  (exists "s:user-startup"))
  260.                              (textfile
  261.                              (dest "s:user-startup")
  262.                              (append ";user-startup \n\n")
  263.                          )
  264.                     )
  265.                     (textfile
  266.                     (dest "ram:user-startup")
  267.                     (include "s:user-startup")
  268.                     (append ";BEGIN PalomaFE assignment\n")
  269.                     (append "assign PalomaFE: " PalomaFE_dir)
  270.                     (append "\n;END PalomaFE assignment\n")
  271.                     )
  272.                     (rename "s:user-startup" "s:user-startup.old")
  273.                     (copyfiles
  274.                     (help @copyfiles-help)
  275.                     (source "ram:user-startup")
  276.                     (dest "s:")
  277.                     )
  278.                     (delete "ram:user-startup")
  279.                )
  280.           )
  281.           )
  282.      )
  283.      )
  284. )
  285.  
  286. (complete 70)
  287.  
  288. (exit)
  289.